//
//  NoticeListCell.m
//  dyseller
//
//  Created by 红喇叭 on 2017/8/16.
//  Copyright © 2017年 红喇叭. All rights reserved.
//

#import "NoticeListCell.h"

@implementation NoticeListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

   
}

- (void)setCellData:(NSDictionary *)dic{
    _tisLab.layer.cornerRadius = 5;
    _tisLab.layer.masksToBounds = YES;
    _tisLab.hidden = YES;
    if([dic[@"newItem"] intValue]<1){
        _tisLab.hidden = YES;
    }else {
        _tisLab.hidden = NO;
    }
    _typeLab.text = dic[@"type"];
    _typeLab.font = [UIFont fontWithName:@"PingFang-SC-Heavy" size:GETHEIGHT(26)];
    _typeContent.text = dic[@"content"];
    _typeContent.font = font14;
    
    
}

- (void)drawRect:(CGRect)rect
{
    CGContextRef context = UIGraphicsGetCurrentContext();
    
    CGContextSetFillColorWithColor(context, [UIColor whiteColor].CGColor);
    CGContextFillRect(context, rect);
    
    CGContextSetStrokeColorWithColor(context,UIColorFromRGB(0xdddddd).CGColor);
    CGContextStrokeRect(context, CGRectMake(0, rect.size.height - 0.1, rect.size.width, 0.1));
}


@end
